#ifndef GY_PENWIDGET_H
#define GY_PENWIDGET_H

#include <QLineEdit>
#include <QMouseEvent>
#include <QHBoxLayout>
#include "GY_PenWidth.h"

/** 自定义画笔显示界面
 * @brief The GY_PenWidget class
 */
class GY_CONTROLLIBRARY_EXPORT GY_PenWidget : public QLineEdit
{
    Q_OBJECT
public:
    GY_PenWidget(QWidget* parent = nullptr);
    ~GY_PenWidget();

    void updataPen(const int &index, const int &type); //更新笔样式

protected:
    void mousePressEvent(QMouseEvent* event); //鼠标点击事件

signals:
    void sendClicked(const int& index);

private:
//    QLabel* m_pLabel;
    GY_PenWidth* m_pPenCssLabel;
    int m_index;
//    int m_type;
};

#endif // GY_PENWIDGET_H
